package com.juyu.miliao.common.util;

import java.util.ArrayList;
import java.util.List;

public class ArrayUtil {
    /**
     * 拆分数组方法
     *
     * @param ary     要分割的数组
     * @param subSize 分割的块大小
     * @return
     */
    public static List<Long[]> splitAry(Long[] ary, int subSize) {
        List<Long[]> aa = new ArrayList<>();
        int f = ary.length / subSize;
        for (int i = 0; i < f; i++) {
            Long[] bbb = new Long[subSize];
            for (int j = 0; j < subSize; j++) {
                bbb[j] = ary[j + i * subSize];
            }
            aa.add(bbb);
        }
        return aa;
    }
}

